#ifndef SESSIONFRIENDAREA_H
#define SESSIONFRIENDAREA_H

#include <QWidget>
#include<QScrollArea>
#include<QScrollBar>
#include<QIcon>
#include<QString>
class SessionFriendArea : public QScrollArea
{
    Q_OBJECT
public:
    explicit SessionFriendArea(QWidget *parent = nullptr);
    //新增好友会话
    void addItem(const QIcon& avater,const QString& name,const QString& text);
    void clear();
signals:

private:
    QWidget* container;
};


class SessionItem : public QWidget
{
    Q_OBJECT
public:
    void paintEvent(QPaintEvent*e) override;

    SessionItem(QWidget* owner,const QIcon& avater,const QString& name,const QString& text);
private:
    QWidget* owner;//指向SessionFriendArea中的container，因为要添加进布局管理器
};

#endif // SESSIONFRIENDAREA_H
